package models;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import play.data.validation.Email;
import play.db.jpa.Model;

@Entity
@Table(name="dream")
public class Dream extends Model{

	@Column(name="experience")
	public String experience;

	@Column(name="country")
	public String country;
	
	@Column(name="description")
	public String description;
	
	@Column(name="price")
	public float price;

	@Column(name="arrival")
	public Date arrival;

	@Column(name="departure")
	public Date departure;
	
	@Column(name="flexible")
	public boolean flexible;

	@Column(name="numPersons")
	public int numPersons;
	
	@Column(name="accomodations")
	public boolean accomodations;
	
	@Column(name="meals")
	public boolean meals;
	
	@Column(name="transportation")
	public boolean transportation;
	
	@Column(name="details")
	public String details;
	
	@ManyToMany(mappedBy="dreams")
	public List<Keyword> keywords = new ArrayList<Keyword>();
	
	@ManyToOne
	public User user;
	
	@OneToMany
	List<Proposal> proposals = new ArrayList<Proposal>();

}
